Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(release): separate docs search index generation #1884

Merged

Conversation

nstuyvesant
Copy link
Contributor

@nstuyvesant nstuyvesant commented Sep 2, 2024

Updates

  • Separates docs website's search index generation into a release workflow step that occurs before the version is generated so the change will be committed when lerna creates the version.
  • Removes search index generation from packages/docs/package.json "build" script.
  • Adds search index generation to packages/docs/package.json "dev" script.
  • Updates action in DMO workflow
  • Bump dependencies: angular, @eslint/js, @playwright/test, @types/node, eslint, eslint-plugin-vue, typescript-eslint, sass, vite, vite-plugin-dts

@nstuyvesant nstuyvesant requested review from theiliad and a team as code owners September 2, 2024 16:36
Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for carbon-charts-core ready!

Name Link
🔨 Latest commit c67d700
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-core/deploys/66dc4c1477421e000832a388
😎 Deploy Preview https://deploy-preview-1884--carbon-charts-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for carbon-charts-react ready!

Name Link
🔨 Latest commit c67d700
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-react/deploys/66dc4c14a3517d0008c7ab2e
😎 Deploy Preview https://deploy-preview-1884--carbon-charts-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for carbon-charts-angular ready!

Name Link
🔨 Latest commit c67d700
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-angular/deploys/66dc4c14eff2ad00086e7ba4
😎 Deploy Preview https://deploy-preview-1884--carbon-charts-angular.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for carbon-charts-docs ready!

Name Link
🔨 Latest commit c67d700
🔍 Latest deploy log https://app.netlify.com/sites/carbon-charts-docs/deploys/66dc4c14446bda000763f86e
😎 Deploy Preview https://deploy-preview-1884--carbon-charts-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

fix(release): cleanup

chore(deps): bump

fix(release): step

chore(dco): bump action version

chore(deps): bump

chore(deps): bump vue

chore(deps): bump

chore(deps): bump dependencies
Comment on lines +28 to +32
node-version: '20.x'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org/'
always-auth: true
auth-token: ${{ secrets.NPM_TOKEN }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eliminate need for explicit minor versions, set yarn cache and npmjs authentication here instead of below.

Comment on lines +20 to +23
- name: Set git user to carbon-bot
run: |
git config --global user.email "carbon@us.ibm.com"
git config --global user.name "carbon-bot"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these up closer to the checkout.

Comment on lines +37 to +38
- name: Generate search index for docs website
run: lerna run build:search --scope @carbon/charts-docs # should be committed in next step
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separated this from docs package build.


- name: Create version and change logs
- name: Create version and change logs and commit to master
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this commits the new version numbers to master, it can also commit the rebuilt search index for the docs website.

Comment on lines -43 to -56
- name: Commit and push changes (if there are any)
run: |
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "skip-release - chore(build): updated search index for docs"
git push origin master
fi
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Publish to npmjs registry and Github
run: |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} -q
npx lerna publish from-git --yes --force-publish
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already handled above.

Comment on lines -16 to +17
"build": "yarn build:search && yarn build:docs && yarn files:pages && yarn build:api:docs",
"dev": "vite --port 3000",
"build": "yarn build:docs && yarn files:pages && yarn build:api:docs",
"dev": "yarn build:search && vite --port 3000",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed building of search index from docs package build. Ensure index is rebuilt before previewing site.

Copy link
Member

@theiliad theiliad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theiliad theiliad merged commit 2d1f84e into carbon-design-system:master Sep 7, 2024
6 checks passed
@theiliad theiliad deleted the separate-docs-search-index branch September 7, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants